//
//  FBConfigHeader.h
//  Friendsback
//
//  Created by 宋质彬 on 2018/3/5.
//  Copyright © 2018年 宋质彬. All rights reserved.
//

#ifndef FBConfigHeader_h
#define FBConfigHeader_h



#ifdef __OBJC__
#import "JSLKitFactory.h"
#import "NSString+Json.h"
#import "UIView+Frame.h"
#import "CacheManager.h"
#import "UserManager.h"
#import "SaveKeyHeader.h"
//#import "AppConfig.h"




#pragma mark - DEBUG
#ifdef DEBUG
#define NSLog( s, ... ) NSLog( @"<%@:(%d)> %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define NSLog( s, ... )
#endif


#pragma mark - FRAM
#define SCREEN_WIDTH                                  ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT                                 ([UIScreen mainScreen].bounds.size.height)




#define APP_VERSION                            [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]


//判断是否 Retina屏、设备是否%fhone 5、是否是iPad
#define iPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define iphone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define iphone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)

#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125,2436), [[UIScreen mainScreen] currentMode].size) : NO)


#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

#define IS_PAD (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad)

#define AutoSizeScaleXX (SCREEN_WIDTH/375.0f)
#define AutoSizeScaleYY (iPhoneX ? ((SCREEN_HEIGHT-22 -34)/667.0f):(SCREEN_HEIGHT/667.0f))

#pragma mark - color functions
#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]

#endif
#endif /* FBConfigHeader_h */
